/*
 * @Author: cest cestrmail@163.com
 * @Date: 2022-12-09 18:04:18
 * @LastEditors: cest cestrmail@163.com
 * @LastEditTime: 2023-02-03 14:54:28
 * @FilePath: /uni-preset-vue-vite-ts-extension-park/vite.config.ts
 * @Description: vite 配置文件。
 */
import { resolve } from 'path'
import { defineConfig } from 'vite'
import uni from '@dcloudio/vite-plugin-uni'
// const { UNI_PLATFORM } = process.env;

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [uni()],
  resolve: {
    alias: [
      {
        find: '@',
        replacement: resolve(__dirname, 'src'),
      },
    ],
  },
  server: {
    // proxy: {
    //   "/api": {
    //     target: "https://api.ithome.com",
    //     changeOrigin: true,
    //     rewrite: (path) => path.replace(/^\/api/, ""),
    //   },
    // },
  },
})
